package com.zl.basis.network;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class NetworkChangedReceiver extends BroadcastReceiver {
    private NetWorkListener netWorkListener;

    @Override
    public void onReceive(Context context, Intent intent) {
        if (getNetWorkListener() != null) {
            getNetWorkListener().onNetWorkChange();
        }
    }

    public NetWorkListener getNetWorkListener() {
        return netWorkListener;
    }

    public void setNetWorkListener(NetWorkListener netWorkListener) {
        this.netWorkListener = netWorkListener;
    }
}
